﻿package kliment.events {
	import flash.events.MouseEvent;
	import flash.display.InteractiveObject;
	
	/**
	 * ...
	 * @author	Kliment
	 * @version	1.0.3
	 * 
	 * class name: kliment.events.MovieClipButtonEvent
	 */
	public class MovieClipButtonEvent extends MouseEvent {
		static public const ROLL_OVER:String 		= "roll_over";
		static public const ROLL_OUT:String 		= "roll_out";
		static public const RELEASE:String 			= "release";
		static public const RELEASE_OUTSIDE:String 	= "release_outside";
		static public const DOUBLE_CLICK:String 	= "double_click";
		static public const MOUSE_DOWN:String 		= "mouse_down";
		static public const MOUSE_PRESSING:String 	= "mouse_pressing";
		static public const MOUSE_MOVE:String 		= "mouse_move";
		static public const MOUSE_UP:String 		= "mouse_up";
		static public const MOUSE_WHEEL:String 		= "mouse_wheel";

		public function MovieClipButtonEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, localX:Number = 0, localY:Number = 0, relatedObject:InteractiveObject = null, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, buttonDown:Boolean = false, delta:int = 0) {
			super(type, bubbles, cancelable, localX, localY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta);
		}
		
		static public function convert(event:MouseEvent, type:String = null, relatedObject:InteractiveObject = null):MovieClipButtonEvent {
			return new MovieClipButtonEvent(type || event.type, event.bubbles, event.cancelable, event.localX, event.localY, relatedObject || event.relatedObject, event.ctrlKey, event.altKey, event.shiftKey, event.buttonDown, event.delta);
		}
		
		public override function toString():String { 
			return formatToString("MovieClipButtonEvent", "type, bubbles", "cancelable", "localX", "localY", "relatedObject", "ctrlKey", "altKey", "shiftKey", "buttonDown", "delta"); 
		}
	}

}